// import "DPI-C" function int mem_read(input int raddr);

module ysyx_23060189_SRAM #
(
  parameter integer dataWidth = 32,
  parameter integer addrWidth = 32
)
(
  input  wire                 clk,
  input  wire                 rst,
  input  wire                 read,
  input  wire [addrWidth-1:0] addr,
  output reg  [dataWidth-1:0] data,

  // input  wire                 ready,
  output wire                 valid
);

  reg [dataWidth-1:0] reg_data;

  assign valid = read == 0 ? 1 : 0;

  always @(posedge clk) begin
    if (read == 1) begin
      data <= mem_read(addr);
    end
    else begin
      data <= data;
    end
  end

endmodule
